-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Spurious message of checkerpool already disposed. #937
Conversation
Looking at the CI result of https://github.com/dafny-lang/dafny/actions/runs/10330235840/job/28615735562?pr=5675, I see like often: ``` System.Exception: CheckerPool was already disposed at VC.CheckerPool.FindCheckerFor(Program program, Split split, CancellationToken cancellationToken) at Microsoft.Boogie.VerificationTask.StartRun(CancellationToken cancellationToken)+MoveNext() at Microsoft.Boogie.VerificationTask.StartRun(CancellationToken ``` This PR hopefully fixes this message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we prevent the exception from being thrown in the first place?
Since at the call site, there is a catch of OperationCanceledException, I piggy back on this exception to return it instead of a generic exception, so that the control flow will not display this exception anymore.
That sounds like it would need a comment both where you throw and where you catch the exception, but better would be not to piggyback on OperationCanceledException
.
We really have a nasty concurrency issue here, and even I am not sure of my fix. Before any brittleness issue on the LSP, I almost always saw one of these message. But I don't know if they always appear or just during errors. If you wanted to get rid of the exception, you'd have to ensure that Now if you remove the exception and What's your take on all of this information? |
Made a PR that might resolve the issue: #941 |
You're the best. Closing this one then and I'll post my review on yours because it seem like it does the right thing. |
Looking at the CI result of https://github.com/dafny-lang/dafny/actions/runs/10330235840/job/28615735562?pr=5675, I see like often:
This PR hopefully fixes this message.
Rationale.
This message does not seem to cause any trouble whatsoever, it's just that the exception is never caught.
Since at the call site, there is a catch of OperationCanceledException, I piggy back on this exception to return it instead of a generic exception, so that the control flow will not display this exception anymore.
I don't know of a way to test this PR, but we will see if the already disposed messages in PR CI disappear.